﻿using DeZhen.DataCollection.Model.Common;
using DeZhen.DataCollection.Model.Enums;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DeZhen.DataCollection.Model.Entities
{
    [SugarTable(TableName = "datasource_settings", TableDescription = "数据源设置表")]
    public class DataSourceSettings : BaseEntity
    {
        /// <summary>
        /// 数据源名称
        /// </summary>
        [SugarColumn(ColumnName = "source_name", ColumnDescription = "数据源名称")]
        public string? SourceName { get; set; }

        /// <summary>
        /// 数据源类型：Mysql/Oracle/SQLServer
        /// </summary>
        [SugarColumn(ColumnName = "source_type", ColumnDescription = "数据源类型")]
        public DbType SourceType { get; set; }

        /// <summary>
        /// 数据库地址
        /// </summary>
        [SugarColumn(ColumnName = "database_url", ColumnDescription = "数据库地址")]
        public string? DatabaseUrl { get; set; }

        /// <summary>
        /// 数据库端口号
        /// </summary>
        [SugarColumn(ColumnName = "database_port", ColumnDescription = "数据库端口号")]
        public int? Port { get; set; }

        /// <summary>
        /// 数据库名称
        /// </summary>
        [SugarColumn(ColumnName = "database_name", ColumnDescription = "数据库名称")]
        public string? DatabaseName { get; set; }

        /// <summary>
        /// 登录用户名
        /// </summary>
        [SugarColumn(ColumnName = "database_user", ColumnDescription = "登录用户名")]
        public string? LoginUser { get; set; }

        /// <summary>
        /// 登录密码
        /// </summary>
        [SugarColumn(ColumnName = "database_password", ColumnDescription = "登录密码")]
        public string? LoginPassword { get; set; }

    }
}
